package Package.ProcessesAndThreads.Threads.SetsAndGetsTheNameOfTheThread;

public class SetsAndGetsTheNameOfTheThread {
    public static final void SetsAndGetsTheNameOfTheThread(){
//方法介绍
//        void setName(String name) 将此线程的名称更改为等于参数name
//        String getName() 返回此线程的名称
//        Thread currentThread() 返回对当前正在执行的线程对象的引用
MyThread my1=new MyThread();
    MyThread my2=new MyThread();
    my1.setName("aaaaaa");
    my2.setName("bbbbbb");
        my1.start();
        my2.start();
        MyThread my3 = new MyThread("飞机");
        MyThread my4 = new MyThread("高铁");
my3.start();
my4.start();

    }
}
